var express = require('express');
var app = express();
var path = require('path');
var controller = require('./controller/index');

//app.use()用于挂载中间件
app.use(express.static('public'));
app.use(controller);
app.set('views', './views');
app.set('view engine', 'jade')


var server = app.listen(8888, function () {
  var host = server.address().address;
  var port = server.address().port;

  console.log('Example app listening at http://%s:%s', host, port);
});